package com.wz.compiler.labeledExpr;

import com.wz.compiler.libExpr.LibExprLexer;
import com.wz.compiler.libExpr.LibExprParser;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream;

import java.io.IOException;

public class LabeledExprTest {

    public static void main(String[] args) throws IOException {
        System.out.println("plz input:");

        CharStream input = CharStreams.fromStream(System.in);
        LabeledExprLexer lexer = new LabeledExprLexer(input);
        CommonTokenStream tokens = new CommonTokenStream(lexer);
        LabeledExprParser parser = new LabeledExprParser(tokens);

        EvalVisitor evalVisitor = new EvalVisitor();
        evalVisitor.visit(parser.prog());
    }
}
